<!DOCTYPE html>
<html>
<#include "../../head.html">
    <body class="full">
    <div class="mc">
        <div class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                <#include "../../adminInfo.html">
                    <!--管理员信息---}-->
                    <div class="nav-wrap">
                        <#include "../left.html">
                    </div>
            </div>
            <!--左侧导航---}-->
        </div>
        <div class="mc-m">
            <div class="navToggle"></div>
        </div>
        <div class="mc-r">
            <!--顶部导航---{-->
            <#include "../../topNav.html">
                <!--顶部导航---}-->

                <!--面包屑导航---{-->
                <#assign moduleName="修改温馨提示">
                    <#include "../banner.html">
                        <!--面包屑导航---}-->

                        <!--工具栏--{-->
                        <div id="toolbar" class="clearfix">

                        </div>
                        <!--工具栏--}-->

                        <div id="main" class="w750 clearfix">

                            <form id="wForm" method="post" action="/admin/operate/modifyWarmPrompt.html" enctype="multipart/form-data" >
                                <div class="valBox">
                                    <div class="top">
                                        <strong>修改温馨提示</strong>
                                    </div>

                                    <div class="clearfix">
                                        <ul class="title-v edit">
                                            <li>
                                                <div class="title">内容：</div>
                                                <div class="v">
                                                    <textarea name="content" id="wContent"><#if wp??>${wp.content}</#if></textarea>
                                                </div>
                                            </li>

                                            <li>
                                                <div class="title">链接地址：</div>
                                                <div class="v s_writeInput">
                                                    <input type="text" name="link" id="link"  class="input_border" value="<#if wp??>${wp.link}</#if>" size="30" />
                                                </div>
                                            </li>
                                            <li>
                                                <div class="title">过期时间：</div>
                                                <div class="v s_writeInput">
                                                    <input class="input_border" style="width:150px;" name="expiryTime" id="expiryTime"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked:pickedFunc})" value="<#if wp??>${wp.expiryTime}</#if>"/>
                                                </div>
                                            </li>

                                        </ul>
                                    </div>
                                    <div id="bottomToolbar" class="clearfix">
                                        <input type="hidden"  name="actionType" value="modify" />
                                        <input type="hidden"  name="id" value="<#if wp??>${wp.id?c}</#if>" />
                                        <input class="input-button" id="modifyBtn" type="button"  name="Submit" value="修改" style="margin-left: 180px;" />
                                    </div>
                                </div>


                            </form>
                        </div>
        </div>
    </div>
    <div class="mc-b">
        <#include "../../foot.html">
    </div>
		<script>
				$("#modifyBtn").click(function(){
					if($("#wContent").val()==''||$("#link").val()==''||$("#expiryTime").val()==''){
						alert('请填写必要信息！');
					}else{
						$("#wForm").submit();
					}
				});
				
				   function pickedFunc(){
                   	//二次审批时间节点计算
					    var expiryTime = $("#expiryTime").html();
				    	if(expiryTime != null && expiryTime != undefined && expiryTime != ""){
					    	var ss = expiryTime.split(" ");
					    	var approvalDate = new Date(Date.parse(ss[0]));
					    	approvalDate.setHours(0);
					    	approvalDate.setMinutes(0);
					    	approvalDate.setSeconds(0);
					    	var y = $dp.cal.getP('y');
					    	var m = $dp.cal.getP('M');
					    	var d = $dp.cal.getP('d');
					    	var preDate = new Date(y,m-1,d,0,0,0);
				    	}
				    }
		</script>
    <#include "../../jsPage.html">
    </body>
</html>